package manager.com.ithei.edu.info.manager.controller;

import manager.com.ithei.edu.info.manager.domain.Student;
import manager.com.ithei.edu.info.manager.service.StudentService;
import manager.com.ithei.edu.info.manager.util.AgeUtil;

import java.io.IOException;
import java.text.ParseException;
import java.util.Scanner;

public class YouHuaStudentController extends FatherStudentController {

    private StudentService studentService = new StudentService();
    private Scanner sc = new Scanner(System.in);

    // 键盘录入学生信息
    @Override
    public Student inputStudentInfo(String id) throws ParseException {
        System.out.println("请输入学生姓名:");
        String name = sc.next();
//        System.out.println("请输入学生年龄:");
//        String age = sc.next();
        System.out.println("请输入学生生日:");
        String birthday = sc.next();
        System.out.println("请输入地址");
        String add = sc.next();
        Student stu = new Student(id, name, AgeUtil.getAge(birthday), birthday, add);
        return stu;

    }
}